


























def sort(self, todo):
"""Do the sort
Machine consists of 3 major components. pusher, tobor, feeders
Certain components can be working on the next die while waiting on others
run_together() allows for this by blocking until both are completed
"""
for placed, die, upcoming in pipeline(todo, size=3):
yield from self.run_together(
self.pick(die), # tobor: down onto die N, pins up, lift
self.feeder_ready(placed, die)) # feeder: past N-1's pocket, right tape, pocket found
yield from self.run_together(
self.carry(die), # tobor: up camera, align, into the pocket
self.pusher_under(upcoming)) # pusher: already off under die N+1
yield from self.checkpoint(die)
-# yes, it's generators all the way down


"WSLG C5R1 S1_3": {
"state": "placed",
"at": "2026-09-27 21:46:25",
"n": 9,
"project": "WSLG",
"cr": "C5R1",
"shot": "1_3",
"design": [
51.179,
69.167
],
"run": 11,
"picked": "2026-09-27 21:46:09",
"placed": "2026-09-27 21:46:25",
"order": 9,
"photo": "partial1/WSLG_009_n9_C5R1_S1_3.jpg"
},

"WSLG C5R1 S1_3": {
"state": "placed",
"at": "2026-09-27 21:46:25",
"n": 9,
"project": "WSLG",
"cr": "C5R1",
"shot": "1_3",
"design": [
51.179,
69.167
],
"run": 11,
"picked": "2026-09-27 21:46:09",
"placed": "2026-09-27 21:46:25",
"order": 9,
"photo": "partial1/WSLG_009_n9_C5R1_S1_3.jpg"
}, 














"WSLG C5R1 S1_3": {
"state": "placed",
"at": "2026-09-27 21:46:25",
"n": 9,
"project": "WSLG",
"cr": "C5R1",
"shot": "1_3",
"design": [
51.179,
69.167
],
"run": 11,
"picked": "2026-09-27 21:46:09",
"placed": "2026-09-27 21:46:25",
"order": 9,
"photo": "partial1/WSLG_009_n9_C5R1_S1_3.jpg"
}, 


